<?php
include '../config/noclose-db.php';
?>
<html>
<head>
<title>Installation</title>
<style type="text/css">
body {font-family: Verdana; font-size: 11px; background-color: #333}
#wrapper {width: 800px; height: 800px; text-align: left; margin: 0 auto; border: 3px groove black; padding: 10px; background-color: white;}
</style>
</head>
<body>
<div id="wrapper">
<h1>Installation Finished!</h1>
<?php
$oldtitle = $row['title'];
$newtitle = $_POST['title'];
$oldkw = $row['keywords'];
$newkw = $_POST['keywords'];
$olddesc = $row['description'];
$newdesc = $_POST['description'];
$oldauth = $row['author'];
$newauth = $_POST['author'];
$oldcss = $row['cssfile'];
$newcss = $_POST['cssfile'];
$oldemb = $row['embed'];
$newemb = $_POST['embed'];

mysql_query("UPDATE xcp SET title = '$newtitle' WHERE title = '$oldtitle'");
mysql_query("UPDATE xcp SET keywords = '$newkw' WHERE keywords = '$oldkw");
mysql_query("UPDATE xcp SET description = '$newdesc' WHERE description = '$olddesc");
mysql_query("UPDATE xcp SET author = '$newauth' WHERE author = '$oldauth'");
mysql_query("UPDATE xcp SET cssfile = '$newcss' WHERE cssfile = '$oldcss'");
mysql_query("UPDATE xcp SET embed = '$newemb' WHERE embed = '$oldemb'");

mysql_close($connect);

rename("install.php", "install.php.old");
?>
<h2>Site installed!</h2>
<i>The <b>install.php</b> file has been renamed to <b>install.php.old</b>. If you need to change some settings, the same interface will be in <b>AdminCP</b>. Thanks for using <b>Xat Custom Page</b> created by <b>Comet</b> of <a href="http://www.silenthq.info/">SilentHQ</a>.<br>Click <a href="../">here</a> to go to your newly installed website!</i> 
</div>
</body>
</html>